require 'asciidoctor'
require 'erb'
require 'fileutils'

FileUtils.mkdir_p('build')
FileUtils.cp_r('../../images','build')
FileUtils.cp_r('asciidoctor.css','build')

guard 'shell' do
  watch (/^.*\.asciidoc$/) {|m|  
    Asciidoctor.render_file(m[0], :to_dir => "build" )
    FileUtils.cp_r('../../images','build')
  }
end
